<%-- 
    Document   : ASettings
    Created on : Mar 24, 2012, 10:26:16 AM
    Author     : Tokino
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1" />
        <META Http-Equiv="Cache-Control" Content="no-cache"/>
        <META Http-Equiv="Cache-Control" Content="no-store"/>
        <META Http-Equiv="Pragma" Content="no-cache"/>
        <META Http-Equiv="Expires" Content="0"/>

        <%
            response.setHeader("Cache-Control", "no-cache, must-revalidate, no-store");
            response.setHeader("Pragma", "no-cache");
            response.setDateHeader("Expires", 0);

        %>
    </head>
    <link rel="stylesheet" href="../style/style.css" type="text/css" id="" media="print, projection, screen" />

    <jsp:useBean id="formChangePassword" class="servlets.PUpdate" scope="request"/>
    <jsp:useBean id="SecprogScopeSession" class=
                 "servlets.SecprogScopeSession" scope="session" />
    <%
        if (!SecprogScopeSession.getIsLogin()) {
            response.sendRedirect("../index.jsp");
        } else if (SecprogScopeSession.getAccounttype() == 1) {
            response.sendRedirect("../customer/CMain.jsp");
        } else if (SecprogScopeSession.getAccounttype() == 10) {
            response.sendRedirect("../admin/AMain.jsp");
        } else if (SecprogScopeSession.getAccounttype() == 3 || SecprogScopeSession.getAccounttype() == 4 || SecprogScopeSession.getAccounttype() == 5 || SecprogScopeSession.getAccounttype() == 6) {
            response.sendRedirect("../product/PMain.jsp");
        } 


    %>
    <body bgcolor="#FFFACD">

        <table width="94%" border="0" align="center">

            <tr >
                <td style="background-color:#FFA500; height:100px">

                </td>
            </tr>
            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a href="PCMain.jsp">Home</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href=""> </a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="ViewFinance.jsp">View Finance</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="PSettings.jsp">Settings</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="../logout/LogoutProcess.jsp">Logout</a>
                </td>
                </td>

            </tr>

            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a href="PSettings.jsp">Change Password</a><font color="#FFFFFF" face="Arial">|</font>

                    <a href=""></a>
                    <font color="#FFFFFF" face="Arial">|</font>
                    <a href=""></a>
                </td>

            </tr>

            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a50>Welcome Accounting <%= SecprogScopeSession.getFullName()%><font color="#FFFFFF" face="Arial">|</font>
                Finance since <%= SecprogScopeSession.getDatecreated()%><font color="#FFFFFF" face="Arial">|</font>
                Last Login is <%= SecprogScopeSession.getLastlogin()%></a50>
        </td>

    </tr>

    <tr>
        <td style="padding-top:5%; padding-left:10%; padding-right:10%; padding-bottom:5%; background-color:#EEEEEE;height:auto;width:920px;">
    <a1>Settings</a1><br>
    <a2>Change Password</a2><br>

    <a53><%=formChangePassword.getErrorMsg("status")%></a53>

    <form name="regsitrator" method="post" action="ChangePasswordProcess.jsp">
        <table>
            <tr>
                <td><a50>Old Password: </a50></td>
            <td><input type="password" name="opassword" value="<%=formChangePassword.getOpassword()%>"/>
            <br><a52><%=formChangePassword.getErrorMsg("opassword")%></a52></td>
            </tr>
            <tr>
                <td><a50>New Password: </a50></td>
            <td><input type="password" name="npassword1" value="<%=formChangePassword.getNpassword1()%>"/>
            <br><a52><%=formChangePassword.getErrorMsg("npassword1")%></a52></td>
            </tr>
            <tr>
                <td><a50>Retype New Password: </a50></td>
            <td><input type="password" name="npassword2" value="<%=formChangePassword.getNpassword2()%>"/>
            <br><a52><%=formChangePassword.getErrorMsg("npassword2")%></a52></td>
            </tr>
            <tr>
                <td><a50><input type="submit" name="bt_change" value="Change"/></a50></td>

            </tr>
        </table>
    </form>


    username is <%= SecprogScopeSession.getUserName()%>
    Session  is <%= SecprogScopeSession.getIsLogin()%>
    accounttype  is <%= SecprogScopeSession.getAccounttype()%>
    Session  is <%= SecprogScopeSession.getSessionid()%>

</td>
</tr>

<tr>
    <td colspan="2" style="background-color:#FFA500;text-align:center;">
        Copyright © 2011</td>
</tr>
</table>

</body>
</html> 